package com.javabasestage2.Object.ObjectMiddle.Work;

public class Work09 {
    //数据可以通过构造器提供
    public static void main(String[] args) {
        new LabeledPoint("funk",20.5,10.6); //构造器初始化
    }
}

class Point{
   private double x;
    private double y;

    public Point(double x, double y) {
        this.x = x;
        this.y = y;
    }
}

class LabeledPoint extends Point{
    private String label;

    public LabeledPoint(String label ,double x, double y) {
        super(x, y);
        this.label = label;
    }
}
